Snapcraft request user to login even if the user is logged in
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
Hello,
Right after logging in with snapcraft (like, 3 minutes after), I created a key and then tried to register it. While I understand some of this calls may call snapd directly, the layer in snapcraft calling snapd could detect this and present a different message to the user, something along the lines of "despite your are already logged in, we need some extra permissions to change the keys registered to your account so please login again".
The sequence that triggered this was:
nessita@miro:~$ snapcraft logout
Credentials cleared.
nessita@miro:~$ snapcraft login
Enter your Ubuntu One e-mail address and password.
If you do not have an Ubuntu One account, you can create one at https://dashboard.snapcraft.io/openid/login
Email: <email address hidden>
Password:
Second-factor auth: ******
Login successful.
nessita@miro:~$ snapcraft list-keys
No keys have been registered. See 'snapcraft register-key --help' to register a key.
nessita@miro:~$ snapcraft create-key brand-store-fake
Passphrase:
Confirm passphrase:
nessita@miro:~$ snapcraft register-key brand-store-fake
Enter your Ubuntu One e-mail address and password.
If you do not have an Ubuntu One account, you can create one at https://dashboard.snapcraft.io/openid/login
Email: ^C
Aborted!
nessita@miro:~$ snapcraft whoami
email: <email address hidden>
developer-id: AfdTtIZrrGjK2D0xQgvZmGJiVIt6Y3cd
nessita@miro:~$ snapcraft register-key brand-store-fake
Enter your Ubuntu One e-mail address and password.
If you do not have an Ubuntu One account, you can create one at https://dashboard.snapcraft.io/openid/login
Email: <email address hidden>
Password:
Second-factor auth: ******
Registering key ...
Done. The key "brand-store-fake" (X1aE18wqvwQffMc37yaduXBqrIuRS_nYv8x8_9W-nTEtVE_m__T4Y94gVqqD9O5F) may be used to sign your assertions.
Evaluation history
No evaluation history available.